#include "dependencydialog.h"
#include "ui_dependencydialog.h"

DependencyDialog::DependencyDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DependencyDialog)
{
    ui->setupUi(this);
    ui->compilerText->insertPlainText((compilerFlags));
    ui->libraryText->insertPlainText((library));
    ui->includeText->insertPlainText((include));
}


DependencyDialog::~DependencyDialog()
{
    delete ui;
}

void DependencyDialog::on_saveButton_pressed()
{
    include = ui->includeText->toPlainText();
    library = ui->libraryText->toPlainText();
    compilerFlags = ui->compilerText->toPlainText();
    this->close();
}

void DependencyDialog::on_cancelButton_pressed()
{

    this->close();
}

void DependencyDialog::setInclude(const QString & inc){
    this->include = inc;
    ui->includeText->insertPlainText((include));
}

void DependencyDialog::setLibrary(const QString & lib){

    this->library = lib;
    ui->libraryText->insertPlainText((library));
}

void DependencyDialog::setCFlags(const QString & cf){
    this->compilerFlags = cf;
    ui->compilerText->insertPlainText((compilerFlags));
}

QString DependencyDialog::getInclude(){

    return include;
}

QString DependencyDialog::getLibrary(){
    return library;
}

QString DependencyDialog::getCFlags(){
    return compilerFlags;
}
